import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const system: AppRouteModule = {
  path: '/system',
  name: 'system',
  component: LAYOUT,
  redirect: '/system/setup',
  meta: {
    orderNo: 900,
    icon: 'ion:settings-outline',
    title: t('routes.demo.system.moduleName'),
    // hideChildrenInMenu: true,//WC
  },
  children: [
    // {
    //   path: 'account',
    //   name: 'AccountManagement',
    //   meta: {
    //     title: t('routes.demo.system.account'),
    //     ignoreKeepAlive: false,
    //     // hideMenu: true,//WC
    //   },
    //   component: () => import('/@/views/demo/system/account/index.vue'),
    // },
    // {
    //   path: 'account_detail/:id',
    //   name: 'AccountDetail',
    //   meta: {
    //     hideMenu: true,
    //     title: t('routes.demo.system.account_detail'),
    //     ignoreKeepAlive: true,
    //     showMenu: false,
    //     currentActiveMenu: '/system/account',
    //   },
    //   component: () => import('/@/views/demo/system/account/AccountDetail.vue'),
    // },
    {
      path: 'setup',
      name: 'setupManagement',
      meta: {
        title: '系统设置',
        // title: t('routes.demo.system.role'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.setupManagement]

        // hideMenu: true,//WC
      },
      component: () => import('/@/views/system/setup/index.vue'),
    },
    {
      path: 'role',
      name: 'RoleManagement',
      meta: {
        title: '用户权限',
        // title: t('routes.demo.system.role'),
        ignoreKeepAlive: true,
        // hideMenu: true,//WC
        roles: [RoleEnum.RoleManagement]
      },
      component: () => import('/@/views/system/role/index.vue'),
    },
    {
      path: 'log',
      name: 'logManagement',
      meta: {
        title: '日志查看',
        // title: t('routes.demo.system.log'),
        ignoreKeepAlive: true,
        roles: [RoleEnum.logManagement]
        // hideMenu: true,//WC
      },
      component: () => import('/@/views/system/log/index.vue'),
    },
    // {
    //   path: 'menu',
    //   name: 'MenuManagement',
    //   meta: {
    //     title: t('routes.demo.system.menu'),
    //     ignoreKeepAlive: true,
    //     // hideMenu: true,//WC
    //   },
    //   component: () => import('/@/views/demo/system/menu/index.vue'),
    // },
    // {
    //   path: 'dept',
    //   name: 'DeptManagement',
    //   meta: {
    //     title: t('routes.demo.system.dept'),
    //     ignoreKeepAlive: true,
    //     // hideMenu: true,//WC
    //   },
    //   component: () => import('/@/views/demo/system/dept/index.vue'),
    // },
    // {
    //   path: 'changePassword',
    //   name: 'ChangePassword',
    //   meta: {
    //     title: t('routes.demo.system.password'),
    //     ignoreKeepAlive: true,
    //     // hideMenu: true,//WC
    //   },
    //   component: () => import('/@/views/demo/system/password/index.vue'),
    // },
    // {
    //   path: '/error-log',
    //   name: 'ErrorLog',
    //   component: () => import('/@/views/sys/error-log/index.vue'),
    //   meta: {
    //     title: t('routes.demo.system.errorLog'),
    //     // hideMenu: true,//WC
    //   },
    // },
  ],
};

export default system;
